<?php
defined('BASEPATH') OR exit('No direct script access allowed');
require_once 'application/controllers/BaseController.php';

class Admin extends BaseController
{
    public function index()
    {
        $data['actTab'] = 'index';
        $data['bcList'] = '<li><i class="fa fa-angle-right"></i><span>首页</span></li>';
        $js = '<script src="/public/echarts/echarts.min.js"></script>';
        $js .= '<script src="/public/echarts/index.js"></script>';
        $cssHeader = '<script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>';
        $content = $this->load->view("index/index", $data, TRUE);
        $this->mp_main->Show_Portal($content, $cssHeader, '首页', $data, $js);
    }

    public function massage_list()
    {
        $data['actTab'] = 'news_lists';
        $data['bcList'] = '<li><i class="fa fa-angle-right"></i><span>消息列表</span></li>';
        $content = $this->load->view("index/message", $data, TRUE);
        $this->mp_main->Show_Portal($content, '', '首页', $data);
    }

    //统计报表
    public function art_sum()
    {
        $data['actTab'] = 'news_lists';
        $data['bcList'] = '<li><i class="fa fa-angle-right"></i><span>统计报表</span></li>';
        $content = $this->load->view("index/sum", $data, TRUE);
        $this->mp_main->Show_Portal($content, '', '统计报表', $data);

    }

    public function getData()
    {
        $data = [
            ['name' => '人生感悟', 'value' => 12],
            ['name' => 'code笔记', 'value' => 50],
            ['name' => '公告信息', 'value' => 8],
        ];
        echo json_encode($data);

    }

}